<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>userInfo</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<script type="text/javascript">
		$(function() {
			$("#backId").click(function() {
				$('#tt').tabs('close', '用户信息');
			});
			$("#saveId").click(function() {				
				var r = $('#userForm').form('validate');
				if(!r) {
					return false;
				}
				$.post("/ExaminationManagementSystem/user/editUserInfo",$("#userForm").serializeArray(),function(data){ 
					$('#tt').tabs('close', '用户信息');
					$.messager.alert('提示',data,'info');
				});
			});			
		});
		$.extend($.fn.validatebox.defaults.rules, {
  		 	mobile: {
		        validator: function (value) {
		        	var reg = /^1[3|4|5|8|9]\d{9}$/;
		            return reg.test(value);
		        },
		        message: '输入手机号码格式不准确.'
	    	}
	   });
	   $(function(){
			$('#userForm input').each(function () {
	            if ($(this).attr('required') || $(this).attr('validType'))
		                $(this).validatebox();
		    });	
	   });
	</script>
	<style type="text/css">
		input{
			width:200px;
			border:1px solid #ccc;
			padding:2px;
		}
	</style>
  </head>
  <body>
  <center>
  <div id="show" class="wrap">
	<form id="userForm" action="/ExaminationManagementSystem/user/editUserInfo" method="post">
	<table id="userInfoId" style="font-size: 13px">
		<tr>
			<td colspan="2" align="center"><h2>用户信息</h2></td>
		</tr>
		<tr>
			<td width="100px">登录：</td>
			<td width="100px">${userSession.loginId }</td>
		</tr>
		<tr>
			<td width="100px">真实姓名：</td>
			<td><span id="names">${userSession.userName }</span></td>			
		</tr>
		<tr>
			<td width="100px">性别：</td>
			<td width="100px"><span id="sex">男</span></td>
		</tr>
		<tr>
			<td width="100px">出生日期：</td>
			<td><span id="birthday">${userSession.birthday }</span></td>
			</tr>
		<tr>
			<td width="100px">电子邮件：</td>
			<td width="100px"><span id="email"><input type="text" class="easyui-validatebox" validType="email" name='email' class="easyui-validatebox"  value="${userSession.email }"  /></span></td>
		</tr>
		<tr>
			<td width="100px">身份证：</td>
			<td><span id="code">${userSession.identityCode }</span></td>
		</tr>
		<tr>
			<td width="100px">地址：</td>
			<td width="100px"><span id="address"><input type="text" class="easyui-validatebox" name="address"  value="${userSession.address }"  /></span></td>
		</tr>
		<tr>
			<td width="100px">手机号码：</td>
			<td><span id="phone"><input type="text" class="easyui-validatebox"  validType="mobile" name="mobile" value="${userSession.mobile }" /></span></td>
		</tr>
		<tr height="10px">
			<td>
			</td>
			<td>
			</td>
		</tr>
		<tr>
			<td >
				<a id="backId" class="easyui-linkbutton"
							iconCls="icon-back">返回</a>
			</td>
			<td>
				<a id="saveId" class="easyui-linkbutton"
							iconCls="icon-save">保存</a>
			</td>
		</tr>
	</table>
	</form>
</div>
</center>
  </body>
</html>
